Repository navigation
RDCON - BUGFIX - Galerkin vacuum matrix keeps its imaginary part - #310
Merged
Merged
Conversation
free_get_wvac called mscvac with complex_flag=.FALSE., so the Galerkin Delta' saw only Re(wv) and, on up-down asymmetric equilibria, missed the frame fix of the previous commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StuartBenjamin
marked this pull request as ready for review
October 13, 2026 21:23
matt-pharr
changed the base branch from
bugfix/dcon-vacuum-theta-frame
to
develop
October 15, 2026 09:38
matt-pharr
approved these changes
Oct 15, 2026
matt-pharr
left a comment
Collaborator
There was a problem hiding this comment.
Just for the record, not using an i-file does not produce quite as clean agreement between rdcon and stride, though this PR does move us monotonically towards stride:
Δ′ results (DIII-D resistive example, rpec_flag=f, mpsi=512, mtheta=512; STRIDE with dmlim and mthvac matched to RDCON)
| q=2 | q=3 | |
|---|---|---|
| RDCON before, LU | 7.031 (−2.04 %) | −3.774 (−16.5 %) |
| RDCON PR, LU | 7.060 (−1.63 %) | −3.729 (−15.1 %) |
| RDCON before, Cholesky | 7.038 (−1.94 %) | −3.431 (−5.9 %) |
| RDCON PR, Cholesky | 7.065 (−1.57 %) | −3.397 (−4.9 %) |
| STRIDE (reference) | 7.178 | −3.239 |
However, this is a correct change and I do not see anything downstream that this might break so I am going to approve + merge to develop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #295 (this PR's base branch): merge after it.
RDCON's Galerkin Δ′ uses a real vacuum matrix.
free_get_wvaccallsmscvacwithcomplex_flag=.FALSE., so the Galerkin edge condition sees only Re(W_v). On an up-down asymmetric equilibrium Im(W_v) is not small, and the free-boundary Δ′ comes out wrong. This is the Galerkin counterpart of the STRIDEcomplex_flagchange in #295, and it builds on #295's conjugation (without it, the imaginary part would enter in the wrong frame). It is a one-line change.Evidence (TokaMaker DIII-D-like H-mode i-file, n = 1, mpsi 512, mtheta 512, no wall):
Stock examples:
solovev_resistive(up-down symmetric, so Im(W_v) = 0) gives a byte-identicaldelta_gw.out.DIIID_resistiveruns withrpec_flag, which replaces the vacuum edge, so its outputs are unchanged as well.🤖 Generated with Claude Code